package com.kern.jpademo.dao;

import com.kern.jpademo.entity.XBook;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by caoshi at 23:11 2021-07-31
 */
public interface IBookDAO extends JpaSpecificationExecutor<XBook>, JpaRepository<XBook, String> {

    @Query(value = "from XBook group by authorId")
    List<XBook> findAll();

}
